target=app
CC=gcc
CFLAGS= -I ./include -I/usr/local/libevent/include
LFLAGS= -Wall -g -L/usr/local/libevent/lib -levent
src=$(wildcard ./src/*.c)
obj=$(patsubst %.c, %.o, $(src))

$(target):$(obj)
	$(CC) $^ -o $@ $(CFLAGS) $(LFLAGS)

%.o:%.cpp
	$(CC) -c $< -o $@  $(CFLAGS) $(LFLAGS)

.PHONY:clean
clean:
	-rm -rf $(target) -f
	-rm -rf $(obj) -f
